package com.learn.practice.service;

import cn.hutool.core.date.DateTime;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
public class CalcServiceImpl implements CalcService{
    @Override
    @Cacheable(value = "test")
    public int divide(int x, int y) {
        System.out.println("=========== CalcService 被调用了" + DateTime.now());
        int result = x / y;
        System.out.println("=========== CalcService 调用成功" + DateTime.now());
        return result;
    }
}
